<?php
    get_header();
?>
<div id="not-found">
<div class="content-sidebar single-deal span9">
    <p class="not-found">Were are readlly sory but the page you requested cannot be found.</p>
    <p class="not-found">Please go <a href="<?php echo site_url();?>"> FindsDeals.com</a>  to see a lot of the lastest deals, or we already have some suggestions below.</p>
    <hr/>
    
    <?php 
//        $meta_query = array();
//        $get_deals_active = array(
//            'key' => 'status_metadata',
//            'value' => 'active',
//            'compare' => '=');
//        array_push($meta_query, $get_deals_active);
        $args = array(
            'post_type' => 'post',
            'post_status' => 'publish',
            'orderby' => 'date',
            'order' => 'DESC',
            'posts_per_page' => 10,
            'meta_query' => array(
                array(
                    'key' => 'status_metadata',
                    'value' => 'active',
                    'compare' => '='
                )
            )
        );
        $query = new WP_Query($args);
        ?>
        
        <?php if ($query->have_posts()) { ?>
        <div class="all-deals-list row-fluid">
            <h1>Top deals to day:</h1>
           <?php foreach ($query->posts as $p) {
                $id = $p->ID;
                cpx_get_deal_info($id);
            } ?>
        </div>
       <?php }?>
        
</div>
</div>
<div class="right-sidebar span3">
    <?php if (is_active_sidebar('cs-span4-right-sidebar')) dynamic_sidebar('cs-span4-right-sidebar'); ?>
</div>
<?php get_footer(); ?>